<template>
  <div class="com_cell">
    <div class="cell_left">
      <img :src="'/companys/' + item.clogo" @click="goto" alt="" />
    </div>
    <div class="cell_middle">
      <div>
        <h2 @click="goto">{{ item.cname }}</h2>
        <img src="@/assets/img/diomand04548.png" alt="" />
        <img src="@/assets/img/freebuy04656.png" alt="" />
      </div>
      <div>
        <img src="@/assets/img/011182135.png" alt="" />
        <span>{{ item.rates }}条</span>
        <span>100%好评</span>
      </div>
      <p>{{ item.caddress }}</p>
      <div>
        <span>到店礼</span><span>{{ item.gifts }}</span>
      </div>
    </div>
    <div class="cell_right">
      <div class="right_up">
        <div>
          <h2>3</h2>
          <span>套餐</span>
        </div>
        <img src="@/assets/img/vertical_line5112915.png" alt="" />
        <div>
          <h2>{{ item.cases }}</h2>
          <span>案例</span>
        </div>
        <img src="@/assets/img/vertical_line5112915.png" alt="" />
        <div>
          <h2>{{ item.fans }}</h2>
          <span>粉丝</span>
        </div>
      </div>
      <div class="right_down">
        <div>
          <span>￥</span>
          <h2>{{ item.minPrice }}</h2>
          <h3>起</h3>
        </div>
        <div @click="goto">
          <span>进店逛逛</span>
          <img src="@/assets/img/right_array122608.png" alt="" />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    item: {
      required: true,
    },
  },
  methods: {
    goto() {
      this.$router.push("/company?cid=" + this.item.cid)
    },
  },
}
</script>

<style lang="scss" scoped>
.com_cell {
  width: 100%;
  height: 230px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e8e8e8;
  .cell_left {
    width: 20%;
    > img {
      width: 100%;
      transition: 0.5s;
      cursor: pointer;
      &:hover {
        opacity: 0.8;
      }
    }
  }
  .cell_middle {
    height: 100%;
    width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    top: 0;
    > div:nth-child(1) {
      display: flex;
      align-items: center;
      > h2 {
        margin: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: pointer;
      }
      > img {
        height: 20px;
        margin-right: 5px;
      }
    }
    > div:nth-child(2) {
      display: flex;
      align-items: center;
      > img {
        height: 13px;
        margin: 0 10px 0 20px;
      }
      > span {
        font-size: 14px;
        color: #333;
        margin-right: 20px;
      }
    }
    > p {
      font-size: 15px;
      color: #333;
      margin: 10px 20px;
    }
    > div:nth-child(4) {
      > span:nth-child(1) {
        font-size: 13px;
        background-color: #fdf1f6;
        color: #e4464b;
        padding: 0 5px;
        margin: 0 10px 0 20px;
      }
      > span:nth-child(2) {
        color: #666;
        font-size: 13px;
      }
    }
  }
  .cell_right {
    height: 100%;
    width: 20%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .right_up {
      margin-top: 20px;
      display: flex;
      > img {
        margin: 0 10px;
        height: 40px;
      }
      > div {
        > h2 {
          text-align: center;
        }
        > span {
          display: block;
          font-size: 8px;
          color: #666;
          text-align: right;
          white-space: nowrap;
        }
      }
    }
    .right_down {
      width: 100%;
      > div:nth-child(1) {
        display: flex;
        color: #e4464b;
        align-items: center;
        // text-align: center;
        width: 100%;
        // margin: 10px auto 10px;
        justify-content: center;

        > span {
          display: inline-block;

          font-weight: bold;
          margin-top: 5px;
        }
        > h2 {
          display: inline-block;
        }
        > h3 {
          display: inline-block;
          font-size: 15px;
          margin-top: 5px;
        }
      }
      > div:nth-child(2) {
        background-color: #e4464b;
        text-align: center;
        width: 90%;
        margin: 10px auto 40px;
        padding: 10px 0;
        border-radius: 100px;
        box-shadow: 0 5px 20px -5px #e4464b;
        cursor: pointer;
        > span {
          color: #fff;
        }
        > img {
          display: inline-block;
          height: 10px;
        }
      }
    }
  }
}
</style>
